unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, IBCustomDataSet, IBUpdateSQL, IBQuery, IBDatabase, StdCtrls,
  Mask, DBCtrls, ExtCtrls, Grids, DBGrids;

type
  TForm1 = class(TForm)
    IBDatabase1: TIBDatabase;
    DBGrid1: TDBGrid;
    DBNavigator1: TDBNavigator;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    IBTransaction1: TIBTransaction;
    qryContato: TIBQuery;
    IBUpdateSQL1: TIBUpdateSQL;
    qryContatoID: TIntegerField;
    qryContatoNOME: TIBStringField;
    qryContatoTELEFONE: TIBStringField;
    DataSource1: TDataSource;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  IBDatabase1.Open;

  qryContato.Open;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  try
    Form2 := TForm2.Create(Self);
    Form2.ShowModal;
  finally
    Form2.Free;
  end;
end;

end.
